.class public Lcom/estrongs/android/pop/app/filetransfer/RippleView;
.super Landroid/widget/TextView;
.source "RippleView.java"


# static fields
.field private static final o:Ljava/lang/String;

.field private static final p:I


# instance fields
.field private a:I

.field private b:I

.field private c:Z

.field private d:I

.field private e:I

.field private f:I

.field private g:I

.field private h:I

.field private i:I

.field private j:I

.field private k:I

.field private l:Landroid/graphics/Paint;

.field private m:Landroid/animation/ObjectAnimator;

.field private n:Landroid/animation/TypeEvaluator;


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .line 1
    const-class v0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->o:Ljava/lang/String;

    const/16 v0, 0x33

    const/16 v1, 0x99

    const/16 v2, 0xcc

    .line 2
    invoke-static {v0, v1, v2}, Landroid/graphics/Color;->rgb(III)I

    move-result v0

    sput v0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->p:I

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 2
    sget p1, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->p:I

    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->a:I

    const/16 p1, 0xc8

    .line 3
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->b:I

    const/4 p1, 0x0

    .line 4
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    .line 5
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d:I

    const/4 p1, 0x4

    .line 6
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->e:I

    const p1, 0xf4240

    .line 7
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->f:I

    const/4 p1, 0x2

    .line 8
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->g:I

    const/16 p1, 0x1e

    .line 9
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->h:I

    .line 10
    new-instance p1, Lcom/estrongs/android/pop/app/filetransfer/RippleView$a;

    invoke-direct {p1, p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView$a;-><init>(Lcom/estrongs/android/pop/app/filetransfer/RippleView;)V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->n:Landroid/animation/TypeEvaluator;

    .line 11
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->e()V

    .line 12
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    .line 13
    invoke-direct {p0, p1, p2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 14
    sget p1, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->p:I

    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->a:I

    const/16 p1, 0xc8

    .line 15
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->b:I

    const/4 p1, 0x0

    .line 16
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    .line 17
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d:I

    const/4 p1, 0x4

    .line 18
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->e:I

    const p1, 0xf4240

    .line 19
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->f:I

    const/4 p1, 0x2

    .line 20
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->g:I

    const/16 p1, 0x1e

    .line 21
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->h:I

    .line 22
    new-instance p1, Lcom/estrongs/android/pop/app/filetransfer/RippleView$a;

    invoke-direct {p1, p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView$a;-><init>(Lcom/estrongs/android/pop/app/filetransfer/RippleView;)V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->n:Landroid/animation/TypeEvaluator;

    .line 23
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->e()V

    .line 24
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 25
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 26
    sget p1, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->p:I

    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->a:I

    const/16 p1, 0xc8

    .line 27
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->b:I

    const/4 p1, 0x0

    .line 28
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    .line 29
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d:I

    const/4 p1, 0x4

    .line 30
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->e:I

    const p1, 0xf4240

    .line 31
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->f:I

    const/4 p1, 0x2

    .line 32
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->g:I

    const/16 p1, 0x1e

    .line 33
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->h:I

    .line 34
    new-instance p1, Lcom/estrongs/android/pop/app/filetransfer/RippleView$a;

    invoke-direct {p1, p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView$a;-><init>(Lcom/estrongs/android/pop/app/filetransfer/RippleView;)V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->n:Landroid/animation/TypeEvaluator;

    .line 35
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->e()V

    .line 36
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/filetransfer/RippleView;)I
    .locals 0

    .line 1
    iget p0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->f:I

    return p0
.end method

.method static synthetic b(Lcom/estrongs/android/pop/app/filetransfer/RippleView;)I
    .locals 0

    .line 1
    iget p0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->h:I

    return p0
.end method

.method private d()V
    .locals 3

    const/4 v0, 0x2

    new-array v0, v0, [I

    .line 1
    fill-array-data v0, :array_0

    const-string v1, "currentProgress"

    invoke-static {p0, v1, v0}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->m:Landroid/animation/ObjectAnimator;

    const/4 v1, -0x1

    .line 2
    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setRepeatCount(I)V

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->m:Landroid/animation/ObjectAnimator;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setRepeatMode(I)V

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->m:Landroid/animation/ObjectAnimator;

    new-instance v1, Landroid/view/animation/LinearInterpolator;

    invoke-direct {v1}, Landroid/view/animation/LinearInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->m:Landroid/animation/ObjectAnimator;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->n:Landroid/animation/TypeEvaluator;

    invoke-virtual {v0, v1}, Landroid/animation/ObjectAnimator;->setEvaluator(Landroid/animation/TypeEvaluator;)V

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->m:Landroid/animation/ObjectAnimator;

    iget v1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->f:I

    int-to-long v1, v1

    invoke-virtual {v0, v1, v2}, Landroid/animation/ObjectAnimator;->setDuration(J)Landroid/animation/ObjectAnimator;

    return-void

    :array_0
    .array-data 4
        0x0
        0xc8
    .end array-data
.end method

.method private e()V
    .locals 2

    .line 1
    invoke-virtual {p0}, Landroid/widget/TextView;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f060320

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getColor(I)I

    move-result v0

    iput v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->a:I

    .line 2
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->l:Landroid/graphics/Paint;

    const/4 v1, 0x1

    .line 3
    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->l:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->l:Landroid/graphics/Paint;

    const/high16 v1, 0x40000000    # 2.0f

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->l:Landroid/graphics/Paint;

    iget v1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->a:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    return-void
.end method


# virtual methods
.method public a()Z
    .locals 1

    .line 2
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    return v0
.end method

.method public b()V
    .locals 1

    .line 2
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    if-nez v0, :cond_0

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->m:Landroid/animation/ObjectAnimator;

    invoke-virtual {v0}, Landroid/animation/ObjectAnimator;->start()V

    const/4 v0, 0x1

    .line 4
    iput-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    :cond_0
    return-void
.end method

.method public c()V
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    if-eqz v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->m:Landroid/animation/ObjectAnimator;

    invoke-virtual {v0}, Landroid/animation/ObjectAnimator;->cancel()V

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c:Z

    :cond_0
    return-void
.end method

.method public getCurrentProgress()I
    .locals 1

    .line 1
    iget v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d:I

    return v0
.end method

.method protected onDetachedFromWindow()V
    .locals 1

    .line 1
    invoke-super {p0}, Landroid/widget/TextView;->onDetachedFromWindow()V

    .line 2
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->c()V

    :cond_0
    return-void
.end method

.method public onDraw(Landroid/graphics/Canvas;)V
    .locals 5

    const/4 v0, 0x0

    .line 1
    :goto_0
    iget v1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->e:I

    if-ge v0, v1, :cond_1

    .line 2
    iget v2, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d:I

    mul-int/lit16 v3, v0, 0xc8

    div-int/2addr v3, v1

    add-int/2addr v2, v3

    rem-int/lit16 v2, v2, 0xc8

    .line 3
    iget v1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->g:I

    const/4 v3, 0x1

    if-ne v1, v3, :cond_0

    rsub-int v2, v2, 0xc8

    .line 4
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->l:Landroid/graphics/Paint;

    mul-int/lit16 v3, v2, 0xff

    div-int/lit16 v3, v3, 0xc8

    rsub-int v3, v3, 0xff

    invoke-virtual {v1, v3}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 5
    iget v1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->i:I

    int-to-float v1, v1

    iget v3, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->j:I

    int-to-float v3, v3

    iget v4, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->k:I

    mul-int v4, v4, v2

    div-int/lit16 v4, v4, 0xc8

    int-to-float v2, v4

    iget-object v4, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->l:Landroid/graphics/Paint;

    invoke-virtual {p1, v1, v3, v2, v4}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 6
    :cond_1
    invoke-super {p0, p1}, Landroid/widget/TextView;->onDraw(Landroid/graphics/Canvas;)V

    return-void
.end method

.method protected onMeasure(II)V
    .locals 4

    .line 1
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v0

    .line 2
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result p1

    const/high16 v1, -0x80000000

    const/high16 v2, 0x40000000    # 2.0f

    if-ne v0, v2, :cond_0

    goto :goto_0

    .line 3
    :cond_0
    iget v3, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->b:I

    if-ne v0, v1, :cond_1

    .line 4
    invoke-static {v3, p1}, Ljava/lang/Math;->min(II)I

    move-result p1

    goto :goto_0

    :cond_1
    move p1, v3

    .line 5
    :goto_0
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v0

    .line 6
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result p2

    if-ne v0, v2, :cond_2

    goto :goto_1

    .line 7
    :cond_2
    iget v2, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->b:I

    if-ne v0, v1, :cond_3

    .line 8
    invoke-static {v2, p2}, Ljava/lang/Math;->min(II)I

    move-result p2

    goto :goto_1

    :cond_3
    move p2, v2

    .line 9
    :goto_1
    div-int/lit8 v0, p1, 0x2

    iput v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->i:I

    .line 10
    div-int/lit8 v0, p2, 0x2

    iput v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->j:I

    .line 11
    invoke-static {p1, p2}, Ljava/lang/Math;->min(II)I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    iput v0, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->k:I

    .line 12
    sget-object v0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->o:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "ripple out view radius = "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->k:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, "; width ="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, "; height = "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 13
    invoke-virtual {p0, p1, p2}, Landroid/widget/TextView;->setMeasuredDimension(II)V

    return-void
.end method

.method protected onSizeChanged(IIII)V
    .locals 0

    .line 1
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->onSizeChanged(IIII)V

    return-void
.end method

.method public setCurrentProgress(I)V
    .locals 0

    .line 1
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->d:I

    .line 2
    invoke-virtual {p0}, Landroid/widget/TextView;->invalidate()V

    return-void
.end method

.method public setMode(I)V
    .locals 0

    .line 1
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/RippleView;->g:I

    return-void
.end method
